package com.yzdmw.toutiao.service;

import com.yzdmw.toutiao.model.News;
import com.yzdmw.toutiao.model.Response;

import java.util.List;

import io.reactivex.rxjava3.core.Observable;
import retrofit2.http.Field;
import retrofit2.http.FormUrlEncoded;
import retrofit2.http.GET;
import retrofit2.http.POST;
import retrofit2.http.Path;
import retrofit2.http.Query;


public interface NewsService {
    @GET("news/public/{type}")
    Observable<Response<List<News>>> publicTypeNews(@Path("type") String type, @Query("page") int page);
    @FormUrlEncoded
    @POST("news/history/")
    Observable<Response<List<News>>> historyNews(@Field("token") String token);
}
